﻿using System.Diagnostics;

namespace WenAntdUI.Controls
{
    public class TestControl2 : Control
    {


        public TestControl2()
        {

            this.Controls.Add(new Label()
            {
                Text = "DesignMode: " + this.DesignMode.ToString(),
                AutoSize = true,
                Location = new Point(0, 0)
            });


            this.Controls.Add(new Label()
            {
                Text = "UsageMode: " + LicenseManager.UsageMode.ToString(),
                AutoSize = true,
                Location = new Point(0, 40)
            });


            this.Controls.Add(new Label()
            {
                Text = "ProcessName: " + Process.GetCurrentProcess().ProcessName,
                AutoSize = true,
                Location = new Point(0, 80)
            });


            this.Controls.Add(new Label()
            {
                Text = "FriendlyName: " + AppDomain.CurrentDomain.FriendlyName,
                AutoSize = true,
                Location = new Point(0, 120)
            });


            if (AppDomain.CurrentDomain.FriendlyName == "DesignToolsServer")
            {
                this.BackColor = Color.Gray;
            }
            else
            {
                this.BackColor = Color.Green;
            }

        }
    }
}
